1. Field of the Invention
This invention is in the field of methods and apparatus for calculating the residue of a signed binary number with respect to a predetermined check base. The residue of such numbers can be used in binary and arithmetic units of a digital data processing system to check the accuracy of arithmetic operations performed on two operands, each of which operations produces a result.
2. Description of the Prior Art
The most relevant prior art of which the applicants are aware that in the concurrently filed U.S. patent application Ser. No. 06/458,795, filed Jan. 18, 1983 entitled "METHOD AND APPARATUS FOR CALCULATING THE RESIDUE OF A BINARY NUMBER" by Joseph C. Circello which is assigned to Honeywell Information Systems Inc., the assignee of this invention, the disclosure of which is incorporated herein by reference. That invention describes and claims method and apparatus for calculating the residues of binary numbers with respect to a check base of the form of 2.sup.b- 1. The bits of the binary number are partitioned into segments, each of b bits starting with the least significant bit. If the number of bits n in the binary number is not an even multiple of b, the higher order bit positions of the segment containing the most significant bit of the binary number are filled with zeros. The segments are applied to levels of carry save adders to reduce the segments to a single sum and a single rotated carry segment where a rotated carry segment is a carry segment produced by a carry save adder, the most significant bit of which is rotated so as to become the least significant bit of the rotated carry segment. Carry segments produced by carry save adders of one level are converted to rotated carry segments before being applied to a carry save adder of a lower level. When the segments are reduced to a single sum segment and a single rotated carry segment which is produced by the lowest level carry save adder, the single sum segment and single rotated carry segment are applied to a one's complement full adder. The resultant is a b bit residue of the binary number. The method and apparatus of the above-identified application, the disclosure of which is incorporated by reference into this application, provides a significantly faster way of calculating the residue of large binary numbers, but it is limited to calculating the residues of unsigned numbers. Thus, there is a need for a method and apparatus for calculating the residue of signed binary numbers rapidly and efficiently since a substantial number of the binary arithmetic calculations in a digital data processor involves signed numbers, typically in the two's complement notation.